
<%@ page import="mms.MedicineRetail" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="bubble" />
        <g:set var="entityName" value="${message(code: 'medicineRetail.label', default: 'MedicineRetail')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
     </head>
    <body>
        <div class="nav">
       </div>
        <div class="body">
            <h1>药品企业实时销售数据</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr> 
                         
                            <th><g:message code="medicineRetail.medicine.label" default="Medicine" /></th>
                             <th><g:message code="medicineRetail.retail.label" default="retail" /></th>
                             <th><g:message code="medicineRetail.amount.label" default="amount" /></th>
                            <th><g:message code="medicineRetail.validity.label" default="validity" /></th>
                            <th><g:message code="medicineRetail.department.label" default="department" /></th>
                            <th><g:message code="medicineRetail.purchase.label" default="purchase" /></th>
                            <th><g:message code="medicineRetail.publish.label" default="publish" /></th>
                       
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${medicineRetailInstanceList}" status="i" var="medicineRetailInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                         
                            <td><b>${fieldValue(bean: medicineRetailInstance, field: "medicine")}</b></td>
                            <td> ${medicineRetailInstance?.retail == 1? "销售" : "入库"}</td> 
                        
                            <td>${fieldValue(bean: medicineRetailInstance, field: "amount")}</td>
                        
                            <td>${medicineRetailInstance?.validity?.replace("00:00:00.000","")}</td>
                        
                            <td>${fieldValue(bean: medicineRetailInstance, field: "department")}</td>
                            <td>${medicineRetailInstance?.purchase}</td>
                            <td>${medicineRetailInstance?.publish?.replace("00:00:00.000","")}</td>
                         
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${medicineRetailInstanceTotal}" id="${id}"/>
            </div>
        </div>
    </body>
</html>
